<% content_for :content do %>



  <h3>Ankiety wypełniane</h3>

  <table cellspacing="0">
    <tr>
      <th style="background-color: silver;">Tytuł</th>
      <th style="background-color: silver;">Gotowa</th>
      <th style="background-color: silver;">Koniec ankiety</th>
    </tr>
  <% for filled_survey in @surveys %>
    <tr class="<%=get_class_name_on_ready(filled_survey)%>" >
        <td style="border: none; text-align: left"><%=h filled_survey.survey.title %></td>
        <td style="border: none;"><%=h filled_survey.ready %></td>
        <td style="border: none;"><%=h filled_survey.survey.endDate %></td>
    </tr>
    <tr>
        <td colspan="3" style="text-align: left; padding: 5px;">
            <%= link_to 'Pokaż',{:id => filled_survey ,:action=>"show_filled_survey"} %>
            <%= link_to 'Edytuj',{:id => filled_survey ,:action=>"edit_filled_survey"} %>
            <%= link_to 'Usuń', {:id => filled_survey ,:action=>"delete_filled_survey"} , :confirm => 'Are you sure?',
                                             :method => :delete%>
        </td>
    </tr> 
  <% end %>

  </table>
<% end %>

